package com.fxbin123.repository;

import com.fxbin123.domain.City;
import org.reactivestreams.Publisher;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;


/**
 * created with IntelliJ IDEA.
 * author: fxbin
 * date: 2018/7/15
 * time: 16:15
 * description:  城市数据访问层
 */
@Repository
public interface CityRepository extends ReactiveMongoRepository<City, Long> {

    /**
     * 通过城市名找出唯一的城市对象方法
     * @param cityName
     * @return
     */
    Mono<City> findByCityName(String cityName);

}
